import { takeEvery, put, fork, delay } from 'redux-saga/effects'
import { actionTypes, increase } from '../action/counter'

function* conterTask() {
    console.log('conterTask');
    yield put(increase())
}

function* fockTask() {
    yield delay(1000)
    console.log('fockTask');
}

export default function* () {
    yield fork(fockTask)
    yield takeEvery(actionTypes.asyncDecrease, conterTask)
}